From: Po Lu Date: Sun, 27 Feb 2022 02:49:19 +0000 (+0800) Subject: * src/xterm.c (handle_one_xevent): Fix translation of button events. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~2537 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=422ad3a01f482867572502d93961c0f0f3d530f1;p=emacs.git * src/xterm.c (handle_one_xevent): Fix translation of button events. --- diff --git a/src/xterm.c b/src/xterm.c index 33a6613e145..03bfbabf317 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11670,7 +11670,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (popup_activated ()) { use_copy = true; - copy.xbutton.type = ButtonRelease; + copy.xbutton.type = (xev->evtype == XI_ButtonPress + ? ButtonPress : ButtonRelease); copy.xbutton.serial = xev->serial; copy.xbutton.send_event = xev->send_event; copy.xbutton.display = dpyinfo->display;